import {createRouter, createWebHashHistory} from 'vue-router'
import IndexView from '../views/IndexView.vue'
import AdminView from '../views/AdminView.vue'
import userView from '../views/manage/userView.vue'
import orderView from '../views/manage/orderView.vue'
import goodsView from '../views/manage/goodsView.vue'
import DetailView from '../views/DetailView.vue'
import cartView from '../views/shopCar.vue'
import personal from '../views/Personal.vue'
import personalFoot from '../views/person/PsersonFoot.vue'
import personalMessage from '../views/person/PsersonMessage.vue'
import PersonalCollect from "../views/person/PersonalCollect.vue";
import PersonalAddress from "../views/PersonalAddress.vue";
import Order from "../views/Order.vue";
import Order1 from "../views/Order1.vue"
import data from "../views/manage/OrderDataView.vue"

const routes = [
    {
        path: '/',
        component: IndexView
    },
    {
        path: '/detail',
        component: DetailView
    },
    {
        path: '/shopCar',
        component: cartView
    },

    {
        path: '/admin',
        component: AdminView,
        children: [
            {
                path: '/manage/userView',
                component: userView
            },
            {
                path: '/manage/goodsView',
                component: goodsView
            }, {
                path: '/manage/orderView',
                component: orderView
            },
            {
                path: '/manage/dataView',
                component: data
            },
            {
                path: '/shopCar',
                component: cartView
            },

        ],
    },
    {
        path: '/personal',
        component: personal,
        children: [
            {
                path: '/person/personalMessage',
                component: personalMessage
            },
            {
                path: '/person/personalFoot',
                component: personalFoot
            },
            {
                path: '/person/personalCollect',
                component: PersonalCollect
            }
        ]
    },
    {
        path: '/personalAddress',
        component:PersonalAddress
    },
    {
        path:'/order',
        component: Order
    },
    {
        path:'/order1',
        component: Order1
    }


]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
